package com.flexcloudsdk.datastore;

import java.util.logging.Logger;
import com.google.appengine.api.datastore.Category;

public class CloudCategory {
	private static final Logger log = Logger.getLogger(CloudCategory.class.getName());
	private String sourceClass;
	private String sourceMethod;

	private Category  category;
    public CloudCategory() {
    		log.info("CloudCtageory has been created by BlazeDS");
    		sourceMethod = Thread.currentThread().getStackTrace()[1].getMethodName().toString();
    		sourceClass = CloudCategory.class.getName();
    		log.info("Executing: " + sourceClass + "." + sourceMethod);
    }
 
    public CloudCategory(String  value) {
		sourceMethod = Thread.currentThread().getStackTrace()[1].getMethodName().toString();
		sourceClass = CloudCategory.class.getName();
		log.info("Executing: " + sourceClass + "." + sourceMethod);

     	category = new Category(value);
    }
    
    public String getCategory() {
		sourceMethod = Thread.currentThread().getStackTrace()[1].getMethodName().toString();
      	log.info("Executing: " + sourceClass + "." + sourceMethod);
     	return category.getCategory();
    }
}
